import { http } from '@/utils/http'
//待检确认table列表接口
export function managementPage(data) {
  return http({
    url: "/api/production-reel-detail/page?sort=createTime,desc",
    method: "post",
    data
  });
}
//称重table列表接口
export function detailPageWeighing(data) {
  return http({
    url: "/api/production-reel-detail/page/weighing?sort=createTime,desc",
    method: "get",
    data
  });
}

//已检查询table列表接口
export function yiDetailPage(data) {
  return http({
    url: "/api/production-reel-detail/mine/inspected/page?sort=createTime,desc",
    method: "post",
    data
  });
}

//拆分批次接口
export function detailSplitBatch(detailId,splitCount) {
  return http({
    url: `/api/production-reel-detail/split-batch?detailId=${detailId}&splitCount=${splitCount}`,
    method: "post",
  });
}
//待检确认的确认接口
export function detailBulkConfirm(data) {
  return http({
    url: `/api/production-reel-detail/bulk-confirm`,
    method: "post",
    data
  });
}

//待检确认确认选择是的接口
export function confirmException(data) {
  return http({
    url: `/api/production-reel-detail/confirm-exception/batch`,
    method: "post",
    data
  });
}

//称重的确认接口
export function pendingInbound(data) {
  return http({
    url: `/api/production-reel-detail/bulk-to-pending-inbound`,
    method: "post",
    data
  });
}
//称重接口
export function confirmWeighing(id,weight) {
  return http({
    url: `/api/production-reel-detail/${id}/confirm-weighing?weight=${weight}`,
    method: "post",
  });
}
//修改重量接口
export function editeWeighing(id,data) {
  return http({
    url: `/api/production-reel-detail/${id}/weight`,
    method: "post",
    data
  });
}

//待检确认和生产待入库扫码接口
export const saomarequest1 = (batchNo) => {
  return http({
    url: `/api/production-reel-detail/by-batch-no?batchNo=${batchNo}`,
    method: 'get',
  })
}
